<template>
  <div class="page home">
    <div class="page-container">
      <el-row :gutter="15" type="flex" style="width: 100%;height: 100%;margin: 0">
        <el-col :span="7" class="col">
          <el-row class="row">
            <Card title="金泉路社区概况">
              <CommunityProfile />
            </Card>
          </el-row>
          <el-row class="row">
            <Card title="队伍建设">
              <TeamBuilding />
            </Card>
          </el-row>
          <el-row class="row">
            <Card title="工作动态">
              <WorkDynamics />
            </Card>
          </el-row>
        </el-col>
        <el-col :span="10" class="col">
          <div class="number-block">
            <TopNumber />
          </div>
          <el-row class="row">
            <Card title="警情类型分析">
              <TypeOfPoliceSituation />
            </Card>
          </el-row>
        </el-col>
        <el-col :span="7" class="col">
          <el-row class="row">
            <Card title="警情分析">
              <PoliceSituation />
            </Card>
          </el-row>
          <el-row class="row">
            <Card title="社区治安">
              <CommunityPolicing />
            </Card>
          </el-row>
          <el-row class="row">
            <Card title="便民服务">
              <ConvenienceService />
            </Card>
          </el-row>
        </el-col>
        <div class="map">
          <IndexMap></IndexMap>
        </div>
      </el-row>
    </div>
  </div>
</template>
<script>
import Card from '@/components/Card.vue'
import CommunityProfile from '@/components/Home/CommunityProfile.vue'
import WorkDynamics from '@/components/Home/WorkDynamics.vue'
import TypeOfPoliceSituation from '@/components/Home/TypeOfPoliceSituation.vue'
import PoliceSituation from '@/components/Home/PoliceSituation.vue'
import CommunityPolicing from '@/components/Home/CommunityPolicing.vue'
import ConvenienceService from '@/components/Home/ConvenienceService.vue'
import IndexMap from '@/components/Home/IndexMap.vue'
import TopNumber from '@/components/Home/TopNumber.vue'
import TeamBuilding from "@/components/Home/TeamBuilding";

export default {
  components: {TeamBuilding, TopNumber, IndexMap, ConvenienceService, CommunityPolicing, PoliceSituation, TypeOfPoliceSituation, WorkDynamics, CommunityProfile, Card }

}
</script>
<style lang="scss" scoped>
.page.home{
  .page-container{
    width: 100%;
    height: 100%;
    position: relative;
    .map{
      width: 50%;
      height:85%;
      z-index: 1;
      position: absolute;
      transform: translate(-50%,0);
      left: 50%;
      top: -85px;
      &::before{
        position: absolute;
        content: '';
        inset: 0;
        z-index: 10;
        pointer-events: none;
        box-shadow: inset 0 0 20px 50px rgba(3, 27, 55, 0.9);
      }
    }
    .col{
      height: 100%;
      display: flex;
      flex-direction: column;
      justify-content: space-between;
      align-items: flex-start;
      position: relative;
      .row{
        width: 100%;
        height: calc(100%/3 - 10px);
        z-index: 10;
        position: relative;
      }
    }
    .col:nth-child(2){
      justify-content: flex-end;
    }
    //.col:nth-child(1){
    //  .row:nth-child(2){
    //    height: calc(100%/3*2 - 10px);
    //  }
    //}
    .number-block{
      position: absolute;
      width: 100%;
      height: 100px;
      left: 0;
      top: 0;
      z-index: 12;
    }
  }
}
</style>
